<?php
/**
 * Created by PhpStorm.
 * User: sykbxc
 * Date: 2019/4/8
 * Time: 19:22
 */

namespace App\Services\AdminService\Services;


use App\Services\AdminService\Models\AdminRoleModel as Role;
use App\Services\BaseService;
use phpDocumentor\Reflection\Types\Self_;

class RoleService extends BaseService
{
    /**
     * 获取所有角色
     * @return AdminRoleModel[]|\Illuminate\Database\Eloquent\Collection
     */
    public static function getAll()
    {
       return Role::all();
    }


    /**
     * @param $id
     * @return mixed
     */
    public static function getByIdOrFail($id)
    {
        return $user = Role::findOrFail($id);
    }


}